FROM ubuntu:16.04
MAINTAINER wuhongliang@neigou.com 2020.11.27

ENV LC_ALL C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
ENV TZ=Asia/Shanghai
#set localtime
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
    && echo $TZ > /etc/timezone

COPY FileRewrite/etc/apt/sources.list /etc/apt/sources.list

RUN apt-get update \
    && apt-get install -y vim \
    wget \
    curl \
    inetutils-ping \
    dnsutils \
    unzip \
    software-properties-common

RUN add-apt-repository -y ppa:nginx/stable \
    && apt-get update

RUN apt-get -y install nginx

ADD entrypoint.sh /root/

RUN chmod +x /root/entrypoint.sh \
    && apt-get clean \
	&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY FileRewrite/ /

EXPOSE 80
WORKDIR /etc/nginx
ENTRYPOINT ["/root/entrypoint.sh"]
CMD ["nginx"]